﻿using System;
using Microsoft.SmallBasic.Library;
using SmallBasicFun;

namespace PentagonCrazy
{
    public class PentagonCrazy
    {
        //private static int LinesOfShape = 40;
        //static decimal zoom = 1;
        //static decimal length = 1;
        public static void Main()
        {
            Tortoise.Show();
            //Make the tortoise move as fast as possible
            Tortoise.SetSpeed(9);
            //CreateColorPalette (recipe below)
            CreateColorPalette();
            //DrawPentagon (recipe below)
            DrawPentagon();

        }


        public static void AdjustPen()
        {
            //------------- Recipe for AdjustPen

            // Change the color of the line the tortoise draws to the next color on the color wheel
         Tortoise.SetPenColor(ColorWheel.GetNextColor());
            // Increase the tortoise//s pen width by 1
            Tortoise.SetPenWidth(+1);
            // If the tortoise//s pen width is greater than 4, then
            if (Tortoise.GetPenWidth() > 4)
            {
                // Reset it to 1
                Tortoise.SetPenWidth(1);
            }
            //------------- End of AdjustPen recipe
        }


        public static void DrawPentagon()
        {
            //------------- Recipe for DrawPentagon

            //Do the following 200 times
            for (int i = 0; i < 200; i++)
            {
                // AdjustPen (recipe below)
                AdjustPen();
                // Move the tortoise the length of a side
                Tortoise.Move(i);
                // Turn the tortoise 1/5th of 360 degrees
                Tortoise.Turn(360/5);
                // Turn the tortoise 1 more degree
                Tortoise.Turn(1);
                //Repeat

                //------------- End of DrawPentagon recipe
            }
    

        }





        public static void CreateColorPalette()
        {
            //------------- Recipe for CreateColorPalette

            // Add steel blue to the color wheel
            ColorWheel.AddColor(Colors.SteelBlue);
            // Add dark orchid to the color wheel
            ColorWheel.AddColor(Colors.DarkOrchid);
            // Add dark slate blue to the color wheel
            ColorWheel.AddColor(Colors.DarkSlateBlue);
            // Add teal to the color wheel
            ColorWheel.AddColor(Colors.Teal);
            // Add indigo to the color wheel
            ColorWheel.AddColor(Colors.Indigo);
            //------------- End of CreateColorPalette recipe
        }
    }
}